home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
pctyp2_c.arc
/
PCTDOC1.EXE
/
lha
/
CHAP6.TXT
< prev
next >
Wrap
Text File
|
1989-04-21
|
26KB
|
561 lines
subject: COMMAND LINE OVERVIEW
Esc key: When you are in normal editing mode, the Esc key moves
the cursor between the text area and the Command Line.
use: There are numerous commands which may be issued from
the Command Line such as EDIT, GET, CALC, search, find
and replace, etc. These commands are initiated by
moving the cursor to the Command Line, typing the
command, and then pressing Enter or F10. The Command
Line will scroll to the left and right if necessary.
editing: The Ins key places the Command Line in insert mode
which is independent of the insert/overwrite mode of
the text area. (The standard mode for the Command
Line is overwrite, and it will always be in overwrite
upon entry or after executing a command).
Tab and Shift Tab move 5 spaces to the right or left.
Ctrl Right Arrow and Ctrl Left Arrow move the cursor
to the next "word" to the right or left on the Command
Line.
Home moves the cursor to the beginning of the line.
End moves the cursor one space beyond the last
character on the line.
Del deletes the character under the cursor.
Backspace moves to the left and deletes that
character.
F6 erases all characters under, and to the right of
the cursor.
F10 key: The commands can also be initiated by pressing F10
instead of Enter. F10 will start a command on the
Command Line even if the cursor is in the text area.
This is a powerful feature, especially for use with
keystroke macros. If the cursor is on the Command
Line when you press F10, the cursor will first move to
the text area before executing the command.
buffer: When you type a new command on the Command Line, it is
saved in a buffer for later use. Up to 10 commands
are saved in this buffer.
The last command issued is always visible on the
Command Line. To recall a previous command, press
Ctrl W when the cursor is on the Command Line.
Repeated Ctrl Ws will cycle through all the commands
in the buffer. You can modify any command as desired
and press Enter or F10 to execute the command.
71
keystrokes: Most keystrokes which operate in the text area will
also function from the Command Line. For example,
Ctrl PgUp which moves the cursor to the top left of
the file you are editing will also perform this
function from the Command Line. The only difference
is that the cursor will remain in the Command Line.
Exceptions to this rule are:
(1) Those keystrokes mentioned under "editing" above
are reserved for Command Line functioning.
(2) Ctrl W, and Enter behave differently as described
above.
(3) Ctrl J (join), and F5 (delete current line) do
not function from the Command Line.
(4) The following keystrokes work just as they would
if you were in the text area, but they will cause
the cursor to leave the Command Line and return to
the text area just as if you had pressed Esc
first:
Up Arrow - moves to bottom text line in
active window.
Down Arrow - moves to next text line below
bottom text line in active
window if it can.
Ctrl Home - moves to upper left corner of
active window.
Ctrl End - moves to lower left corner of
active window.
F8 - initiates highlight options
menu.
F10 - initiates command.
Ctrl O - checks spelling of word under
cursor in TEXT AREA.
Ctrl V - highlights word under cursor
in text area.
Ctrl Z - initiates Fault Finder.
commands: The remainder of this section will describe each
command which can be issued from the Command Line.
command: SEARCH (FIND)
purpose: Locate a group of characters in the text being edited
and move the cursor to that location.
setup: Move cursor to Command Line.
format: {-}/string{/ {b {n}}}
{-}\string{\ {b {n}}}
72
discussion: Without optional initial '-' character, the text will
be searched beginning one character beyond the current
cursor position toward the end of the file to find a
group of characters which matches "string".
With optional initial '-' character, the text will be
searched beginning one character before the current
cursor position toward the beginning of the file to
find a group of characters which matches "string".
'/' implies that the search is case insensitive, i.e.,
if "string" is "abc", then "abc", "AbC", "ABC", etc.
will all be considered as valid matches.
'\' implies that the search is case sensitive, i.e.,
if "string" is "abc", then only "abc" can be considered
as a valid match.
The optional trailing '/' or '\' allows blank characters
to be included at the end of the string to be matched
and permits the {b {n}} options to be used.
The optional {b {n}}, implies the search process
should only conducted on each line beginning at column
b, for a maximum of n columns. If b is present but
not n, then the search will be conducted from column b
to the end of each line.
NOTE: when n is used, the entire string must exist
within the n columns specified or no match will
be registered. Thus n must have a value of at
least "string" characters.
example(s): -\Find this
The text is searched from one character before the
current cursor location toward the beginning of the
file to find an exact match for the characters
"Find this". (Quote marks not included.)
/Find this / 15 25
The text is searched starting at one character after
the cursor location toward the end of the file to find
the sequence of characters "Find this " regardless of
case. (Quote marks not included.) The search is only
made from columns 15 through 39 of each line.
command: FIND and REPLACE
purpose: Locate a group of characters in the text and
optionally replace them with a second group of
characters.
setup: Move cursor to Command Line.
format: {-}/string1/string2/ {b {n}}
73
{-}\string1\string2\ {b {n}}
discussion: Without optional initial '-' character, the text will
be searched beginning one character beyond the current
cursor position toward the end of the file to find a
group of characters which matches "string1".
With optional initial '-' character, the text will be
searched beginning one character before the current
cursor position toward the beginning of the file to
find a group of characters which matches "string1".
'/' implies that the search is case insensitive.
'\' implies that the search is case sensitive.
"string2" is the replacement string.
The optional {b {n}}, implies the search process
should only conducted on each line beginning at column
b, for a maximum of n columns. If b is present but
not n, then the search will be conducted from column b
to the end of each line.
NOTE: when n is used, the entire string must exist
within the n columns specified or no match will
be registered. Thus n must have a value of at
least string1 characters.
process: When a match is found for string1, the string will be
highlighted and the following question will be asked:
Answer by pressing Y, N or X. Y and X will cause
"string2" to replace "string1". Next you will be
asked:
Find Next? (Y/N) (or X=Yes and don't ask)
Y and X will cause the Find and Replace operation to
continue, whereas N will cause it to stop. (If you
press Esc in response to either of these questions,
the process will also stop).
Answering X to the first question causes Find and
Replace to replace each match as it is found.
Answering X to the second question causes the Find and
Replace to search for the next match without waiting.
Two X responses is called a GLOBAL find and replace.
All occurrences of "string1" from the current cursor
position to the end of the file will be automatically
replaced by "string2".
Answering X to the second question only allows you to
step through each match in the file and visually
74
inspect it before making the decision to replace it or
not.
Answering X to the first question only will
automatically replace the next match found, but allows
you to terminate the process after any replacement has
been made.
example: -\But,\However,\ 5 20
Find the string "But," from one character to the
left of the current cursor position toward the
beginning of the file (if it occurs within the column
range 5 to 24) and replace it with the string
"However," on request.
command: CALCULATE
purpose: Find the result of a simple equation and save the
result in a buffer so it can be inserted into the text
area if needed.
setup: Move cursor to Command Line.
format: CALC equation {h} -or- CALC equation {d}
equation: The equation may contain the operators:
+ addition
- subtraction
* or x multiplication
/ or ÷ division
Parentheses can be included. The natural hierarchy of
operations is used, i.e., multiplication and division
are performed before addition and subtraction.
Values may be:
standard decimal values» - 500 15.3 .5678
exponential values» - 1.5E+3 .5E-8
hexadecimal values» - 04ABh 0FFh 01234h
Note that hexadecimal values must begin with a zero
and must end with the character h.
result: The result of the equation will be displayed in a
window in the center of your screen and the message
line will read:
Move to desired location and press Ctrl_ to insert
data
The result is placed in the "math buffer" and will
remain there until another calculation (or a date or
time stamp) is performed. Ctrl _ will cause the
75
contents of the buffer to be inserted in the text.
The number of decimal places displayed in the result
is normally 2. If a value in the equation has more
than two decimal places displayed, then that number of
digits following the decimal point will be displayed.
10+2.3333 --> 12.3333
10+2.3 --> 12.30
If the last character in the equation is h, the result
will be expressed as a hexadecimal number.
examples: (8+6)x(5-2) --> 42.00 8+6 x 5-2 --> 36.00
50/25+10 --> 12.00 50/25+10h --> Ch
(50/25+10)h --> Ch (50/25+010h) --> 18.00
(020h) --> 32.00 20h --> 14h
command: DROP TO DOS
purpose: Permits you to execute a DOS instruction or even
execute a small program without having to exit
PC-Type II.
setup: Move the cursor to the Command Line.
format: DOS command
ALLDOS command
where "command" is the DOS command to run, e.g. DIR.
discussion: "Command" is passed to DOS just as if you were
actually in the DOS environment at the DOS prompt.
The screen will be cleared and the command will be
executed. When the command is finished, the message
"Press a key to continue" will be displayed.
After you press a key your screen will be replaced as
it was before issuing the command.
If you want to drop to DOS and stay there for a series
of commands, just place the keyword DOS on the Command
Line with no following command. You will remain in
DOS until you type EXIT to return.
NOTE: If you are going to run another program after
dropping to DOS, it is good practice to save
your file first. Otherwise, if the other
program behaved poorly and crashed your system,
you could lose the file you were editing.
PC-Type II uses a fair amount of memory, and the more
files you have active, or the larger the files are
which are active, the less memory is available for
going to DOS to execute other commands or programs.
If there is insufficient memory available to go to
76
DOS, then a message to that effect will be given.
ALLDOS: The ALLDOS command will write the memory being used by
PC-Type II to disk before dropping to DOS and executing
"command". When the "command" is finished, the memory
saved on disk will be restored before returning to
PC-Type II. This permits you to run large programs
without leaving PC-Type II.
The DOS Command Line instruction is faster but may not
be able to work if insufficient memory remains. The
ALLDOS Command Line instruction is slower but permits
you to run sizable programs when you drop to DOS.
example: DOS dir a:*.doc
Drop to DOS and do a directory of all the .DOC files
on the current directory of the A disk.
command: EDIT
purpose: To edit another file (or part of a file).
setup: Move the cursor to the Command Line. Alternatively
you may perform the identical function with the
"(E)dit/Get" option from the Main Menu (F2).
format: edit filespec {b {n}} -or- editp filespec {b {n}}
pct filespec {b {n}} -or- pctp filespec {b {n}}
discussion: FILESPEC can be any valid file specification and can
include drive, path, filename and file extension. It
can also include the standard DOS DIR command wildcard
characters "*" and "?". If it includes the wildcard
characters, then all files fitting the description
will be presented to you in a menu from which you can
choose the specific file you want.
{b {n}} are optional parameters specifying "begin at"
and "for n". If the EDIT command keyword used was
"EDIT", then b and n refer to line numbers. If the
EDIT command keyword used was "EDITP", then b and n
refer to page numbers.
If neither b nor n are used, then the entire file will
be loaded. If only b is used, then the file will be
loaded from the beginning point to the end of the
file.
PCT and PCTP are aliases for EDIT and EDITP. If you
are like me, you will get in a habit of typing PCT to
edit other files.
NOTE: If you enter PC-Type II with the simplest entry
command, PCT after the DOS prompt, then you will
77
be in an empty file called "New File". Should
you EDIT a file in this situation, the name "New
File" will be replaced by the name of the file
just loaded.
examples: EDIT c:\letters\mom.8
The entire file MOM.8 in directory LETTERS of drive C
is loaded into PC-Type II.
PCTP c:\letters\mom.8 3 2
Pages 3 and 4 of the same letter are loaded.
EDIT c:\letters\mom.8 45
The same letter is loaded starting at line number 45
to the end of the file.
command: GET
purpose: To load all or part of a file on disk into the file
currently being edited.
setup: Move the cursor to the Command Line. Alternatively
you may perform the identical function with the
"(E)dit/Get" option from the Main Menu (F2).
format: get{p} filespec {b {n}}
discussion: FILESPEC can be any valid file specification and can
include drive, path, filename and file extension. It
can also include the standard DOS DIR command wildcard
characters "*" and "?". If it includes the wildcard
characters, then all files fitting the description
will be presented to you in a menu from which you can
choose the specific file you want.
{b {n}} are optional parameters specifying "begin at"
and "for n". If the GET command keyword used was
"GET", then b and n refer to line numbers. If the GET
command keyword used was "GETP", then b and n refer to
page numbers.
If neither b nor n are used, then the entire file will
be loaded. If only b is used, then the file will be
loaded from the beginning point to the end of the
file.
When a file is loaded with the GET command, it will be
inserted in the current text between the line on which
the cursor is located and the following line.
NOTE: If you enter PC-Type II with the simplest entry
command, PCT after the DOS prompt, then you will
be in an empty file called "New File". Should
you GET a file in this situation, the name "New
File" will be replaced by the name of the file
78
just loaded.
examples: GET c:\letters\mom.8
The entire file MOM.8 in directory LETTERS of drive C
is loaded into the current file on the line following
the cursor.
GETP c:\letters\mom.8 3 2
Pages 3 and 4 of the same letter are loaded following
the cursor line.
GET c:\letters\mom.8 45
The same letter is loaded into the current file
starting at line number 45 to the end of the file.
command: NAME
purpose: To change the file specification of the current file
being edited.
setup: Move cursor to Command Line.
format: NAME filespec
discussion: The filespec provided can include drive, path,
filename and file extension. If only a filename and
file extension are provided, then the default
directory is assumed.
After typing NAME followed by the new filespec on the
Command Line and pressing Enter, the file
specification of the current file being edited will be
changed to the new filespec supplied. The name will
change in the highlighted filespec area in the double
line at the top of the active window.
If the screen is split and the same file appears in
more than one window, the name will be changed in all
places.
The renamed file will always be referenced by the new
name.
NOTE: Some invalid file specifications will be caught,
but the NAME command is very lenient about the
file specification you provide. However, should
you try to save the file and the new
specification is invalid, then you will be asked
to modify it at that time.
example: NAME c:\mydir\newname.pct
The name of the current file being edited will be
changed to NEWNAME.PCT, and if saved, will be saved on
drive C in directory MYDIR.
79
command: PRINT
purpose: Initiate printing by going to the Print Window.
setup: Move the cursor to the Command Line.
format: PRINT
discussion: The effect of this command is identical to pressing P
from the Main Menu (F2).
command: GOTO and SCROLL
purpose: GOTO moves the cursor to a specified line in the file.
SCROLL moves the cursor a specified number of lines
toward the top or bottom of the file.
setup: Move the cursor to the Command Line.
format: n (This is GOTO)
+n (This is SCROLL)
-n (This is SCROLL)
discussion: GOTO
Typing a number n on the Command Line and then
pressing Enter or F10 will cause the cursor to be
moved to the line specified. If a line number is
given which exceeds the length of the file, an error
message will be issued.
This is an especially useful command if you use
PC-Type II as an editor for source code, for when you
compile, errors are usually given by line number.
With this command you can immediately go to the
erroneous line.
SCROLL
Typing a number n preceded by a + or - sign causes the
cursor to move n lines toward the end or toward the
beginning of the current file being edited.
This is useful if you want to move the screen up or
down within the file by a value that differs from
the number of lines visible in the window. It can
also be a useful command, (in conjunction with F10),
when creating keystroke macros.
examples: 156
The cursor will be moved to line 156 of the file.
-38
The cursor will be moved 38 lines toward the beginning
of the file. If the cursor was on line 138, it will
be on line 100 after the command is issued.
80